Optimal. Leaf size=156 \[ \frac {(c+d x)^3}{3 (a+b) d}-\frac {b (c+d x)^2 \log \left (1-\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right ) f}+\frac {b d (c+d x) \text {PolyLog}\left (2,\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right ) f^2}+\frac {b d^2 \text {PolyLog}\left (3,\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{2 \left (a^2-b^2\right ) f^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.21, antiderivative size = 156, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3812, 2221,
2611, 2320, 6724} \begin {gather*} \frac {b d (c+d x) \text {Li}_2\left (\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{f^2 \left (a^2-b^2\right )}-\frac {b (c+d x)^2 \log \left (1-\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{f \left (a^2-b^2\right )}+\frac {b d^2 \text {Li}_3\left (\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{2 f^3 \left (a^2-b^2\right )}+\frac {(c+d x)^3}{3 d (a+b)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2221
Rule 2320
Rule 2611
Rule 3812
Rule 6724
Rubi steps
\begin {align*} \int \frac {(c+d x)^2}{a+b \coth (e+f x)} \, dx &=\frac {(c+d x)^3}{3 (a+b) d}-(2 b) \int \frac {e^{-2 (e+f x)} (c+d x)^2}{(a+b)^2+\left (-a^2+b^2\right ) e^{-2 (e+f x)}} \, dx\\ &=\frac {(c+d x)^3}{3 (a+b) d}-\frac {b (c+d x)^2 \log \left (1-\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right ) f}+\frac {(2 b d) \int (c+d x) \log \left (1+\frac {\left (-a^2+b^2\right ) e^{-2 (e+f x)}}{(a+b)^2}\right ) \, dx}{\left (a^2-b^2\right ) f}\\ &=\frac {(c+d x)^3}{3 (a+b) d}-\frac {b (c+d x)^2 \log \left (1-\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right ) f}+\frac {b d (c+d x) \text {Li}_2\left (\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right ) f^2}-\frac {\left (b d^2\right ) \int \text {Li}_2\left (-\frac {\left (-a^2+b^2\right ) e^{-2 (e+f x)}}{(a+b)^2}\right ) \, dx}{\left (a^2-b^2\right ) f^2}\\ &=\frac {(c+d x)^3}{3 (a+b) d}-\frac {b (c+d x)^2 \log \left (1-\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right ) f}+\frac {b d (c+d x) \text {Li}_2\left (\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right ) f^2}+\frac {\left (b d^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (\frac {(a-b) x}{a+b}\right )}{x} \, dx,x,e^{-2 (e+f x)}\right )}{2 \left (a^2-b^2\right ) f^3}\\ &=\frac {(c+d x)^3}{3 (a+b) d}-\frac {b (c+d x)^2 \log \left (1-\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right ) f}+\frac {b d (c+d x) \text {Li}_2\left (\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right ) f^2}+\frac {b d^2 \text {Li}_3\left (\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{2 \left (a^2-b^2\right ) f^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.41, size = 204, normalized size = 1.31 \begin {gather*} \frac {b \left (\frac {4 (a+b) e^{2 e} f^3 x \left (3 c^2+3 c d x+d^2 x^2\right )}{a \left (-1+e^{2 e}\right )+b \left (1+e^{2 e}\right )}-6 f^2 (c+d x)^2 \log \left (1+\frac {(a+b) e^{2 (e+f x)}}{-a+b}\right )-6 d f (c+d x) \text {PolyLog}\left (2,\frac {(a+b) e^{2 (e+f x)}}{a-b}\right )+3 d^2 \text {PolyLog}\left (3,\frac {(a+b) e^{2 (e+f x)}}{a-b}\right )\right )}{6 (a-b) (a+b) f^3}+\frac {x \left (3 c^2+3 c d x+d^2 x^2\right ) \sinh (e)}{3 (b \cosh (e)+a \sinh (e))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(734\) vs.
\(2(157)=314\).
time = 5.03, size = 735, normalized size = 4.71
method | result | size |
risch | \(\frac {d^{2} x^{3}}{3 a +3 b}+\frac {d c \,x^{2}}{a +b}+\frac {c^{2} x}{a +b}+\frac {c^{3}}{3 \left (a +b \right ) d}+\frac {2 b \,c^{2} \ln \left ({\mathrm e}^{f x +e}\right )}{f \left (a +b \right ) \left (a -b \right )}-\frac {b \,c^{2} \ln \left (a \,{\mathrm e}^{2 f x +2 e}+b \,{\mathrm e}^{2 f x +2 e}-a +b \right )}{f \left (a +b \right ) \left (a -b \right )}+\frac {2 b \,d^{2} e^{2} \ln \left ({\mathrm e}^{f x +e}\right )}{f^{3} \left (a +b \right ) \left (a -b \right )}-\frac {b \,d^{2} e^{2} \ln \left (a \,{\mathrm e}^{2 f x +2 e}+b \,{\mathrm e}^{2 f x +2 e}-a +b \right )}{f^{3} \left (a +b \right ) \left (a -b \right )}+\frac {2 b \,d^{2} x^{3}}{3 \left (a +b \right ) \left (a -b \right )}-\frac {2 b \,d^{2} e^{2} x}{f^{2} \left (a +b \right ) \left (a -b \right )}-\frac {4 b \,d^{2} e^{3}}{3 f^{3} \left (a +b \right ) \left (a -b \right )}-\frac {b \,d^{2} \ln \left (1-\frac {\left (a +b \right ) {\mathrm e}^{2 f x +2 e}}{a -b}\right ) x^{2}}{f \left (a +b \right ) \left (a -b \right )}+\frac {b \,d^{2} \ln \left (1-\frac {\left (a +b \right ) {\mathrm e}^{2 f x +2 e}}{a -b}\right ) e^{2}}{f^{3} \left (a +b \right ) \left (a -b \right )}-\frac {b \,d^{2} \polylog \left (2, \frac {\left (a +b \right ) {\mathrm e}^{2 f x +2 e}}{a -b}\right ) x}{f^{2} \left (a +b \right ) \left (a -b \right )}+\frac {b \,d^{2} \polylog \left (3, \frac {\left (a +b \right ) {\mathrm e}^{2 f x +2 e}}{a -b}\right )}{2 f^{3} \left (a +b \right ) \left (a -b \right )}-\frac {4 b d e c \ln \left ({\mathrm e}^{f x +e}\right )}{f^{2} \left (a +b \right ) \left (a -b \right )}+\frac {2 b d e c \ln \left (a \,{\mathrm e}^{2 f x +2 e}+b \,{\mathrm e}^{2 f x +2 e}-a +b \right )}{f^{2} \left (a +b \right ) \left (a -b \right )}-\frac {2 b c d \ln \left (1-\frac {\left (a +b \right ) {\mathrm e}^{2 f x +2 e}}{a -b}\right ) x}{f \left (a +b \right ) \left (a -b \right )}-\frac {2 b c d \ln \left (1-\frac {\left (a +b \right ) {\mathrm e}^{2 f x +2 e}}{a -b}\right ) e}{f^{2} \left (a +b \right ) \left (a -b \right )}+\frac {2 b d c \,x^{2}}{\left (a +b \right ) \left (a -b \right )}+\frac {4 b d c e x}{f \left (a +b \right ) \left (a -b \right )}+\frac {2 b d c \,e^{2}}{f^{2} \left (a +b \right ) \left (a -b \right )}-\frac {b c d \polylog \left (2, \frac {\left (a +b \right ) {\mathrm e}^{2 f x +2 e}}{a -b}\right )}{f^{2} \left (a +b \right ) \left (a -b \right )}\) | \(735\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 309 vs.
\(2 (154) = 308\).
time = 0.38, size = 309, normalized size = 1.98 \begin {gather*} -\frac {{\left (2 \, f x \log \left (-\frac {{\left (a + b\right )} e^{\left (2 \, f x + 2 \, e\right )}}{a - b} + 1\right ) + {\rm Li}_2\left (\frac {{\left (a + b\right )} e^{\left (2 \, f x + 2 \, e\right )}}{a - b}\right )\right )} b c d}{a^{2} f^{2} - b^{2} f^{2}} - \frac {{\left (2 \, f^{2} x^{2} \log \left (-\frac {{\left (a + b\right )} e^{\left (2 \, f x + 2 \, e\right )}}{a - b} + 1\right ) + 2 \, f x {\rm Li}_2\left (\frac {{\left (a + b\right )} e^{\left (2 \, f x + 2 \, e\right )}}{a - b}\right ) - {\rm Li}_{3}(\frac {{\left (a + b\right )} e^{\left (2 \, f x + 2 \, e\right )}}{a - b})\right )} b d^{2}}{2 \, {\left (a^{2} f^{3} - b^{2} f^{3}\right )}} - c^{2} {\left (\frac {b \log \left (-{\left (a - b\right )} e^{\left (-2 \, f x - 2 \, e\right )} + a + b\right )}{{\left (a^{2} - b^{2}\right )} f} - \frac {f x + e}{{\left (a + b\right )} f}\right )} + \frac {2 \, {\left (b d^{2} f^{3} x^{3} + 3 \, b c d f^{3} x^{2}\right )}}{3 \, {\left (a^{2} f^{3} - b^{2} f^{3}\right )}} + \frac {d^{2} x^{3} + 3 \, c d x^{2}}{3 \, {\left (a + b\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 658 vs.
\(2 (154) = 308\).
time = 0.37, size = 658, normalized size = 4.22 \begin {gather*} \frac {{\left (a + b\right )} d^{2} f^{3} x^{3} + 3 \, {\left (a + b\right )} c d f^{3} x^{2} + 3 \, {\left (a + b\right )} c^{2} f^{3} x + 6 \, b d^{2} {\rm polylog}\left (3, \sqrt {\frac {a + b}{a - b}} {\left (\cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )\right )}\right ) + 6 \, b d^{2} {\rm polylog}\left (3, -\sqrt {\frac {a + b}{a - b}} {\left (\cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )\right )}\right ) - 6 \, {\left (b d^{2} f x + b c d f\right )} {\rm Li}_2\left (\sqrt {\frac {a + b}{a - b}} {\left (\cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )\right )}\right ) - 6 \, {\left (b d^{2} f x + b c d f\right )} {\rm Li}_2\left (-\sqrt {\frac {a + b}{a - b}} {\left (\cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )\right )}\right ) - 3 \, {\left (b c^{2} f^{2} - 2 \, b c d f \cosh \left (1\right ) + b d^{2} \cosh \left (1\right )^{2} + b d^{2} \sinh \left (1\right )^{2} - 2 \, {\left (b c d f - b d^{2} \cosh \left (1\right )\right )} \sinh \left (1\right )\right )} \log \left (2 \, {\left (a + b\right )} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + 2 \, {\left (a + b\right )} \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + 2 \, {\left (a - b\right )} \sqrt {\frac {a + b}{a - b}}\right ) - 3 \, {\left (b c^{2} f^{2} - 2 \, b c d f \cosh \left (1\right ) + b d^{2} \cosh \left (1\right )^{2} + b d^{2} \sinh \left (1\right )^{2} - 2 \, {\left (b c d f - b d^{2} \cosh \left (1\right )\right )} \sinh \left (1\right )\right )} \log \left (2 \, {\left (a + b\right )} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + 2 \, {\left (a + b\right )} \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) - 2 \, {\left (a - b\right )} \sqrt {\frac {a + b}{a - b}}\right ) - 3 \, {\left (b d^{2} f^{2} x^{2} + 2 \, b c d f^{2} x + 2 \, b c d f \cosh \left (1\right ) - b d^{2} \cosh \left (1\right )^{2} - b d^{2} \sinh \left (1\right )^{2} + 2 \, {\left (b c d f - b d^{2} \cosh \left (1\right )\right )} \sinh \left (1\right )\right )} \log \left (\sqrt {\frac {a + b}{a - b}} {\left (\cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )\right )} + 1\right ) - 3 \, {\left (b d^{2} f^{2} x^{2} + 2 \, b c d f^{2} x + 2 \, b c d f \cosh \left (1\right ) - b d^{2} \cosh \left (1\right )^{2} - b d^{2} \sinh \left (1\right )^{2} + 2 \, {\left (b c d f - b d^{2} \cosh \left (1\right )\right )} \sinh \left (1\right )\right )} \log \left (-\sqrt {\frac {a + b}{a - b}} {\left (\cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )\right )} + 1\right )}{3 \, {\left (a^{2} - b^{2}\right )} f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (c + d x\right )^{2}}{a + b \coth {\left (e + f x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (c+d\,x\right )}^2}{a+b\,\mathrm {coth}\left (e+f\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________